package com.shangxia.monomer.study.designPatterns.behavioralType.iterator;

import lombok.extern.slf4j.Slf4j;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/**
 * @ProjectName: monomer
 * @ClassName: IteratorDemo
 * @Time: 2021/8/8
 * @Author: zhouy
 * @Description:
 * @Experience:
 */

@Slf4j
public class IteratorDemo {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        Iterator<String> iterator = list.iterator();
        while (iterator.hasNext()) {
            String next = iterator.next();
        }
    }
}
